﻿using System;
using System.Collections.Generic;
using System.Net;

namespace CreativeMinds.DNSAPI.Core {

	public interface IDNSAPI {
		void CreatePrimaryZone(String zoneName, ZoneTransferType transfer, List<IPAddress> allowTransferTo, List<String> ns, Int32 ttl, Int32 expiryLimit, Int32 retryDelay, Int32 refreshInterval, Int32 minimumTTL, String soaStart, String responsiblePerson);
		void CreateSecondaryZone(String zoneName, List<IPAddress> primaries);
		//void ReadZone();
		//void ReadZones();
		void UpdatePrimaryZone();
		void UpdateSecondaryZone(String zoneName, List<IPAddress> primaries);
		void DeleteZone(String zoneName);

		void CreateARecord(String zoneName, String domain, IPAddress address);
		void CreateAAAARecord(String zoneName, String domain, IPAddress address);
		void CreateCNAMERecord(String zoneName, String domain, String alias);
		void CreateMBRecord(String zoneName, String domain, String server);
		void CreateMXRecord(String zoneName, String domain, String server, Int32 priority);
		void CreateNSRecord(String zoneName, String domain, String server);
		void CreateRPRecord(String zoneName, String domain, String mailHost, String text);
		void CreateSOARecord(String zoneName, String server, String responsiblePerson, Int32 expiryLimit, Int32 minimumTTL, Int32 refreshInterval, Int32 retryDelay, Int32 serialNumber);
		void CreateTXTRecord(String zoneName, String domain, String text);

		void UpdateARecord(String zoneName, String domain, IPAddress address);
		void UpdateAAAARecord(String zoneName, String domain, IPAddress address);
		void UpdateCNAMERecord(String zoneName, String domain, String alias);
		void UpdateMBRecord(String zoneName, String domain, String mailHost);
		void UpdateSOARecord(String zoneName, String server, String responsiblePerson, Int32 expiryLimit, Int32 minimumTTL, Int32 refreshInterval, Int32 retryDelay, Int32 serialNumber);
		void UpdateMXRecord(String zoneName, String domain, String oldHost, String newHost, Int32 oldPriority, Int32 newPriority);
		void UpdateTXTRecord(String zoneName, String domain, String oldText, String newText);

		void DeleteARecord(String zoneName, String domain);
		void DeleteAAAARecord(String zoneName, String domain);
		void DeleteCNAMERecord(String zoneName, String domain);
		void DeleteNSRecord(String zoneName, String domain, String server);
		void DeleteMBRecord(String zoneName, String domain);
		void DeleteRPRecord(String zoneName, String domain, String mailHost);
		void DeleteMXRecord(String zoneName, String domain, String mailHost, Int32 priority);
		void DeleteTXTRecord(String zoneName, String domain, String text);
		void DeleteSOARecord(String zoneName);
		void DeleteAllTXTRecords(String zoneName);
		void DeleteAllMXRecords(String zoneName);
	}
}